﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="Curso.aspx.cs" Inherits="admin_Curso" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
        <ProgressTemplate>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <br />
    <div class="titulo">
        <asp:Label ID="lblTitulo" runat="server" Text="Cursos"></asp:Label>
    </div>
    <br />
    <div class="grid">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="grvPrincipal" runat="server" PageSize="25" EnableViewState="false"
                    AllowPaging="true" AllowSorting="true" DataKeyNames="cod_curso_cur" DataSourceID="odsCurso"
                    Width="600px"  OnRowDataBound="grvPrincipal_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="des_curso_cur" HeaderText="Descrição" SortExpression="des_curso_cur">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="qtd_vagas_cur" HeaderText="Vagas" SortExpression="qtd_vagas_cur">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="des_turno_cur" HeaderText="Turno" SortExpression="des_turno_cur">
                            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:BoundField DataField="sts_ativo_cur" HeaderText="Ativo" SortExpression="sts_ativo_cur">
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
                        </asp:BoundField>
                        <asp:TemplateField>
                            <HeaderStyle HorizontalAlign="Right" VerticalAlign="Top" />
                            <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="20px" />
                            <ItemTemplate>
                                <asp:ImageButton ID="btnAlterar" runat="server" Width="16px" Height="16px" PostBackUrl='<%# Eval("cod_curso_cur", "CursoCad.aspx?cod_curso_cur={0}") %>'
                                    ImageUrl="~/img/editar.png" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        Nenhum registro foi encontrado!
                    </EmptyDataTemplate>
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        <div class="button">
            <asp:Button ID="btnConsultar" runat="server" Text="Consultar" />
            <asp:Button ID="btnCadastrar" runat="server" Text="Cadastrar" PostBackUrl="~/admin/CursoCad.aspx" />
        </div>
    </div>
    <asp:ObjectDataSource ID="odsCurso" runat="server" TypeName="ProcessoSeletivo.DAO.Curso"
        SelectMethod="ListarCurso"></asp:ObjectDataSource>
</asp:Content>
